#ifndef EYERWANDARTIST_EWAUITIMELINEPLUSWIDGET_HPP
#define EYERWANDARTIST_EWAUITIMELINEPLUSWIDGET_HPP

#include "EWAUITrackHeader.hpp"
#include "EWAUITimelineContext.hpp"
#include "EWAUIRuleWidget.hpp"
#include "EWAUITrackScrollContentLayout.hpp"

#include "EWAUIWidget/EWAUIWidgetHeader.hpp"
#include "EWAUIWidget/EWAUIWidgetHorizontalSegBar.hpp"

#include "EWAUITrackBody.hpp"
#include "EWAPrjFragmentUI.hpp"
#include "EWAPrjFragmentFragmentResourse.hpp"

#include "EWAUITrackHeaderAudio.hpp"
#include "EWAUITrackHeaderVideo.hpp"

#include "EWAUITrackBodyVideo.hpp"
#include "EWAUITrackBodyAudio.hpp"

#include "EWAUIWidgetScrollVideoTrack.hpp"

namespace Eyer
{
    class EWAUITimelinePlusWidget : public EWAUIWidget
    {
    public:
        EWAUITimelinePlusWidget(const EyerSmartPtr<EWAUITimelineContext> & _timelineCtx, EWAUILayoutParams width, EWAUILayoutParams height);
        ~EWAUITimelinePlusWidget();

        int AddTrack(const EyerString & trackId);
        int InsertFragment(const EyerSmartPtr<EWAPrjFragmentFragmentResourse> & fragment, int trackId);

        virtual bool OnMouseMoveEvent (const Vec2I & pos) override;

        virtual Vec2I OnMeasure(int suggestWidth, int suggestHeight, int level = 0) override;
    private:
        EyerSmartPtr<EWAUITimelineContext> timelineCtx;

        EyerSmartPtr<EWAUILayout> ruleLayout;
            EyerSmartPtr<EWAUILayout> ruleHeaderLayout;
            EyerSmartPtr<EWAUIRuleWidget> ruleWidget;

        EyerSmartPtr<EWAUIWidgetScrollVideoTrack> videoTrackLayout;
            EyerSmartPtr<EWAUITrackHeaderVideo> videoTrackHeader;
            EyerSmartPtr<EWAUIWidgetScroll> videoTrackBodyLayout;
                EyerSmartPtr<EWAUITrackBodyVideo> videoTrack;

        EyerSmartPtr<EWAUIWidgetVerticalSegBar> segBar;

        EyerSmartPtr<EWAUIWidgetScroll> audioTrackLayout;
            EyerSmartPtr<EWAUITrackHeaderAudio> audioTrackHeader;
            EyerSmartPtr<EWAUIWidgetScroll> audioTrackBodyLayout;
                EyerSmartPtr<EWAUITrackBodyAudio> audioTrack;
    };
}

#endif //EYERWANDARTIST_EWAUITIMELINEPLUSWIDGET_HPP
